<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - Contact Us';
$this->breadcrumbs=array(
	'Contact',
);
CHtml::$errorContainerTag = 'span';
?>

<div class="large-12 columns">
<h1>Contact Us</h1>

<div class="flash-success">
	<?php 
	if(Yii::app()->user->hasFlash('contact'))
	echo '<div id="flashModal" class="reveal-modal" data-reveal>
			<h2>Contacting.</h2>
			<p>'.Yii::app()->user->getFlash('contact').'</p>
			<a class="close-reveal-modal">&#215;</a>
		</div>';
	?>
</div>

<p>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you.
</p>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'errorMessageCssClass'=>'error'
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php //echo $form->errorSummary($model); ?>

	<div class="row">
		<div class="large-12 columns">
			<label>
				<?php echo $form->labelEx($model,'name'); ?>
				<?php echo $form->textField($model,'name'); ?>
			</label>
			<?php echo $form->error($model,'name'); ?>
		</div>
	</div>

	<div class="row">
		<div class="large-12 columns">
			<label>
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email'); ?>
		</label>
		<?php echo $form->error($model,'email'); ?>
		</div>
	</div>

	<div class="row">
		<div class="large-12 columns">
			<label>
		<?php echo $form->labelEx($model,'subject'); ?>
		<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128)); ?>
		</label>
		<?php echo $form->error($model,'subject'); ?>
		</div>
	</div>

	<div class="row">
		<div class="large-12 columns">
			<label>
		<?php echo $form->labelEx($model,'body'); ?>
		<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
		</label>
		<?php echo $form->error($model,'body'); ?>
		</div>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<div class="large-4 columns">
			<label>
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
	</label>
	<?php echo $form->error($model,'verifyCode'); ?>
		</div>
		<div class="hint">Please enter the letters as they are shown in the image above.
		<br/>Letters are not case-sensitive.</div>
		
	</div>
	<?php endif; ?>

	<div class="row">
		<div class="large-4 columns">
			<?php echo CHtml::submitButton('Submit', array('class'=>'medium button green')); ?>
		</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

</div>